mydata <- read.csv('/Users/xbasra/Documents/Data/Airway_Clustering/Original_Data/AirwayDiseasePhenotypingDataSets5/WSAS_AndOLIN_AirwayDiseasePhenotyping.csv')
result_airway_uft_DEC <- read.csv('/Users/xbasra/Documents/Data/Airway_Clustering/Intermediate/CSV_output_data/result_airway_uft_DEC.csv')
#Libraries
library(tidyverse)
library(treeClust)
library(Rtsne)
library(ggplot2)
library(factoextra)
library(plotly)
library(cowplot)
Get_Binary_data <- function(Data){
# checking the data format
if (!is.data.frame(Data)){
stop("The Data is not in dataframe format")
}
# droping lopnr
# Selecting Specific Variables under the selection creteria. other_CVD all yes
drops <- c("lopnr","kohort","urbanization","rhinitis_ever","wheeze_ever")
Airway2 <- Data[ , !(names(Data) %in% drops)]
# this is only to adjust the smoking varaible to three categories Basically replacing number 0 with Never-Smoker
Airway2 <- Airway2 %>% mutate(ever_smoker20py=replace(ever_smoker20py, ever_smoker20py==0, 'Never-smoker')) %>% as.data.frame()
# replacing ever_Somoker variable with integer values
Airway2$ever_smoker20py <- ifelse(Airway2$ever_smoker20py == 'Never-smoker',0, ifelse(Airway2$ever_smoker20py == '<=20 packyears',1, ifelse(Airway2$ever_smoker20py == '>20 packyears',2,0)))
# converting the ever_somke to integer variable
Airway2$ever_smoker20py <- as.integer(Airway2$ever_smoker20py)
Airway2 <- mutate(Airway2, Longstanding_cough = if_else(Longstanding_cough == "Yes", 1L, 0L),
Sputum_production = if_else(Sputum_production == "Yes", 1L,0L),
Chronic_productive_cough = if_else(Chronic_productive_cough == "Yes", 1L, 0L),
Recurrent_wheeze = if_else(Recurrent_wheeze == "Yes", 1L,0L),
exp_dust_work = if_else(exp_dust_work == "Yes",1L,0L),
gender = if_else(gender == "male", 1L,0L))
return(Airway2)
}
## Density plot
dist_plot_clust <-function(original_data, selected_variable){
selected_variable <- enquo(selected_variable)
ggplot(original_data, aes(UQ(selected_variable))) + geom_density(aes(fill = factor(cluster)), alpha=0.8) +
labs(title = "Density plot",
subtitle="sIgE_f1 of persons Grouped by Clusters",
caption="Source: Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="sIgE_f1",
fill="# Clusters")
}
result_Air_tree_UFT_DEC <- Airway2
Error: object 'Airway2' not found
#result_Airway_tree$age <- mydata$age_class3 # adding age variable from the original data
#ggplot(data = result_Airway_tree, aes (x = result_Airway_tree$age, fill = result_Airway_tree$clusters )) + geom_bar(position = "dodge2")
result_Air_tree_UFT_DEC$clusters <- as.factor(result_Air_tree_UFT_DEC$clusters)
age_g <- ggplot(result_Air_tree_UFT_DEC, aes(F107))
age_p <- age_g + geom_density(aes(fill=factor(clusters)), alpha=0.8) +
labs(title="Density plot",
subtitle="Age of persons Grouped by Clusters",
caption="Source: Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="Age",
fill="# Clusters")
#p <- ggplot(data = result_Airway_tree, aes (x = F107, fill = clusters )) + geom_bar(position = "dodge2")
ggplotly(age_p)
bmi_p <- dist_plot_clust(original_data = result_Air_tree_UFT_DEC, selected_variable = BMI)
bmi_p
fev_g <- ggplot(result_Air_tree_UFT_DEC, aes(fev1pp_olin))
fev_p <- fev_g + geom_density(aes(fill=factor(clusters)), alpha=0.8) +
labs(title="Density plot",
subtitle="fev1pp_olin of persons Grouped by Clusters",
caption="Source: Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="fev1pp_olin",
fill="# Clusters")
fvc_g <- ggplot(result_Air_tree_UFT_DEC, aes(fev1pp_olin))
fvc_p <- fvc_g + geom_density(aes(fill=factor(clusters)), alpha=0.8) +
labs(title="Density plot",
subtitle="fev1pp_olin of persons Grouped by Clusters",
caption="Source: Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="fev1pp_olin",
fill="# Clusters")
plot_grid(fev_p, fvc_p, labels = "auto")
# Histogram on a Continuous (Numeric) Variable
g <- ggplot(result_Air_tree_UFT_DEC, aes(F107)) + scale_fill_brewer(palette = "Spectral")
k <- g + geom_histogram(aes(fill=factor(clusters)),
binwidth = .1,
col="black",
size=.1) + # change binwidth
labs(title="Histogram with Auto Binning",
subtitle="Age across different clusters",
x="Age",
fill="# Clusters")
ggplotly(k)
s <- g + geom_histogram(aes(fill=factor(clusters)),
bins=5,
col="black",
size=.1) + # change number of bins
labs(title="Histogram with Fixed Bins",
subtitle="Age across different clusters",
x="Age",
fill="# Clusters")
ggplotly(s)
g <- ggplot(result_Air_tree_UFT_DEC, aes(factor(clusters), F107))
l <- g + geom_boxplot(aes(fill=factor(clusters))) +
theme(axis.text.x = element_text(angle=65, vjust=0.6)) +
labs(title="Box plot",
subtitle="Age grouped by cluster of person",
caption="Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="cluster of person",
y="Age")
ggplotly(l)
colnames(num_result_dec)
[1] "F107" "fev1pp_olin" "fvcpp_olin" "BMI" "post_fev1_fvc_ratio"
[6] "delta_fev1" "clusters"
g_2 <- ggplot(result_Air_tree_UFT_DEC, aes(factor(clusters), fev1pp_olin))
l_2 <- g_2 + geom_boxplot(aes(fill=factor(clusters))) +
theme(axis.text.x = element_text(angle=65, vjust=0.6)) +
labs(title="Box plot",
subtitle="Age grouped by cluster of person",
caption="Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="cluster of person",
y="fev1pp_olin")
ggplotly(l_2)
g_3 <- ggplot(result_Air_tree_UFT_DEC, aes(factor(clusters), BMI))
l_3 <- g_3 + geom_boxplot(aes(fill=factor(clusters))) +
theme(axis.text.x = element_text(angle=65, vjust=0.6)) +
labs(title="Box plot",
subtitle="Age grouped by cluster of person",
caption="Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="cluster of person",
y="BMI")
ggplotly(l_3)
g_4 <- ggplot(result_Air_tree_UFT_DEC, aes(factor(clusters), post_fev1_fvc_ratio))
l_4 <- g_4 + geom_boxplot(aes(fill=factor(clusters))) +
theme(axis.text.x = element_text(angle=65, vjust=0.6)) +
labs(title="Box plot",
subtitle="Age grouped by cluster of person",
caption="Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="cluster of person",
y="post_fev1_fvc_ratio")
ggplotly(l_4)
g_5 <- ggplot(result_Air_tree_UFT_DEC, aes(factor(clusters), delta_fev1))
l_5 <- g_5 + geom_boxplot(aes(fill=factor(clusters))) +
theme(axis.text.x = element_text(angle=65, vjust=0.6)) +
labs(title="Box plot",
subtitle="Age grouped by cluster of person",
caption="Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="cluster of person",
y="delta_fev1")
ggplotly(l_5)
g_6 <- ggplot(result_Air_tree_UFT_DEC, aes(factor(clusters), fvcpp_olin))
l_6 <- g_6 + geom_boxplot(aes(fill=factor(clusters))) +
theme(axis.text.x = element_text(angle=65, vjust=0.6)) +
labs(title="Box plot",
subtitle="Age grouped by cluster of person",
caption="Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="cluster of person",
y="fvcpp_olin")
ggplotly(l_6)
# categorical variables vis
k <- ggplot(result_Air_tree_UFT_DEC, aes_string(as.factor(result_Air_tree_UFT_DEC$Longstanding_cough), fill = as.factor(result_Air_tree_UFT_DEC$clusters))) + geom_bar(position = "dodge2") +
labs(title="Box plot",
subtitle="Age grouped by cluster of person",
caption="Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="Long standing cough",
y="Count")
ggplotly(k)
# categorical variables vis
k_2 <- ggplot(result_Air_tree_UFT_DEC, aes_string(as.factor(result_Air_tree_UFT_DEC$dyspneaMRC), fill = as.factor(result_Air_tree_UFT_DEC$clusters))) + geom_bar(position = "dodge2") +
labs(title="Box plot",
subtitle="Age grouped by cluster of person",
caption="Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="Long standing cough",
y="Count")
ggplotly(k_2)
k_3 <- ggplot(result_Air_tree_UFT_DEC, aes_string(as.factor(result_Air_tree_UFT_DEC$ever_smoker20py), fill = as.factor(result_Air_tree_UFT_DEC$clusters))) + geom_bar(position = "dodge2") +
labs(title="Box plot",
subtitle="Age grouped by cluster of person",
caption="Source: results of Hierarchical clustering with tree-based distance and distance d1",
x="Long standing cough",
y="Count")
ggplotly(k_3)
result_Airway_tree$ever_smoker20py <- as.factor(result_Airway_tree$ever_smoker20py)
result_Airway_tree$dyspneaMRC <- as.factor(result_Airway_tree$dyspneaMRC)
table_tree <- tableby(clusters ~ ., data = as.list(result_Airway_tree))
summary(table_tree, title = "Charachtaristcs of Clusters")
write.csv(result_Airway_tree,'/Users/xbasra/Documents/Data/Airway_Clustering/Intermediate/CSV_output_data/result_Airway_tree_d1_hc.csv')
catdes(result_Air_tree_UFT_DEC_2, 23)
Link between the cluster variable and the categorical variables (chi-square test)
=================================================================================
p.value df
dyspneaMRC 0.000000e+00 20
ever_smoker20py 3.965147e-54 10
asthmatic_wheeze 3.188526e-43 5
wheezeSB 1.453088e-40 5
Recurrent_wheeze 3.537243e-36 5
Sputum_production 2.583850e-28 5
Airway_medicine_use2 6.981025e-27 5
current_rhinitis 3.150519e-26 5
fam_asthma_allergy 2.849254e-19 5
Chronic_productive_cough 3.138500e-17 5
exp_dust_work 1.813407e-13 5
Longstanding_cough 4.346748e-07 5
gender 4.624488e-07 5
exacerbations 1.718670e-06 5
IgEorSPT 3.875284e-06 5
fam_bronch_emphys 1.109370e-04 5
Description of each cluster by the categories
=============================================
$`0`
Cla/Mod Mod/Cla Global p.value v.test
dyspneaMRC=0 50.22901 100.000000 52.1081941 2.721225e-117 23.023345
ever_smoker20py=0 40.25357 77.203647 50.1988862 3.218041e-31 11.621142
Sputum_production=0 32.78689 66.869301 53.3810660 9.153538e-09 5.745711
current_rhinitis=1 30.31625 84.498480 72.9514718 1.325154e-08 5.682789
Recurrent_wheeze=0 29.59918 87.537994 77.4065235 9.970614e-08 5.327259
fam_asthma_allergy=1 33.52713 52.583587 41.0501193 8.953519e-07 4.913346
Chronic_productive_cough=0 28.82012 90.577508 82.2593477 1.473043e-06 4.814858
IgEorSPT=0 33.75315 40.729483 31.5831344 4.266735e-05 4.092540
wheezeSB=0 27.26473 94.224924 90.4534606 5.039782e-03 2.804480
Longstanding_cough=0 28.15217 78.723404 73.1901352 7.665100e-03 2.666476
fam_bronch_emphys=0 27.17584 93.009119 89.5783612 1.508110e-02 2.430426
dyspneaMRC=3 0.00000 0.000000 0.7955449 4.748780e-02 -1.981924
fam_bronch_emphys=1 17.55725 6.990881 10.4216388 1.508110e-02 -2.430426
Longstanding_cough=1 20.77151 21.276596 26.8098648 7.665100e-03 -2.666476
wheezeSB=1 15.83333 5.775076 9.5465394 5.039782e-03 -2.804480
IgEorSPT=1 22.67442 59.270517 68.4168656 4.266735e-05 -4.092540
Chronic_productive_cough=1 13.90135 9.422492 17.7406523 1.473043e-06 -4.814858
fam_asthma_allergy=0 21.05263 47.416413 58.9498807 8.953519e-07 -4.913346
dyspneaMRC=2 0.00000 0.000000 3.8981702 2.476610e-07 -5.159462
Recurrent_wheeze=1 14.43662 12.462006 22.5934765 9.970614e-08 -5.327259
ever_smoker20py=1 16.66667 21.580547 33.8902148 1.946182e-08 -5.616718
current_rhinitis=0 15.00000 15.501520 27.0485282 1.325154e-08 -5.682789
Sputum_production=1 18.60068 33.130699 46.6189340 9.153538e-09 -5.745711
ever_smoker20py=2 2.00000 1.215805 15.9108990 2.028060e-23 -9.971662
dyspneaMRC=1 0.00000 0.000000 42.8003182 3.629607e-99 -21.137065
$`1`
Cla/Mod Mod/Cla Global p.value v.test
dyspneaMRC=0 49.6183206 99.6932515 52.1081941 3.701293e-113 22.606965
fam_asthma_allergy=0 33.7381916 76.6871166 58.9498807 1.022896e-14 7.736377
asthmatic_wheeze=0 28.8443171 92.6380368 83.2935561 2.248518e-08 5.591704
Airway_medicine_use2=0 28.5152409 88.9570552 80.9069212 7.888232e-06 4.468195
gender=1 31.6749585 58.5889571 47.9713604 8.427916e-06 4.454015
IgEorSPT=1 29.3023256 77.3006135 68.4168656 4.564601e-05 4.076870
current_rhinitis=0 33.8235294 35.2760736 27.0485282 1.360419e-04 3.815256
wheezeSB=0 27.3526825 95.3987730 90.4534606 1.897122e-04 3.732336
exacerbations=0 26.5508685 98.4662577 96.1813842 8.086012e-03 2.648457
ever_smoker20py=1 30.5164319 39.8773006 33.8902148 8.545864e-03 2.629706
ever_smoker20py=2 33.5000000 20.5521472 15.9108990 9.237298e-03 2.603145
dyspneaMRC=3 0.0000000 0.0000000 0.7955449 4.905321e-02 -1.968129
exacerbations=1 10.4166667 1.5337423 3.8186158 8.086012e-03 -2.648457
wheezeSB=1 12.5000000 4.6012270 9.5465394 1.897122e-04 -3.732336
current_rhinitis=1 23.0098146 64.7239264 72.9514718 1.360419e-04 -3.815256
IgEorSPT=0 18.6397985 22.6993865 31.5831344 4.564601e-05 -4.076870
gender=0 20.6422018 41.4110429 52.0286396 8.427916e-06 -4.454015
ever_smoker20py=0 20.4437401 39.5705521 50.1988862 8.116151e-06 -4.462097
Airway_medicine_use2=1 15.0000000 11.0429448 19.0930788 7.888232e-06 -4.468195
dyspneaMRC=2 0.0000000 0.0000000 3.8981702 2.913257e-07 -5.128974
asthmatic_wheeze=1 11.4285714 7.3619632 16.7064439 2.248518e-08 -5.591704
fam_asthma_allergy=1 14.7286822 23.3128834 41.0501193 1.022896e-14 -7.736377
dyspneaMRC=1 0.1858736 0.3067485 42.8003182 2.167220e-95 -20.722587
$`2`
Cla/Mod Mod/Cla Global p.value v.test
dyspneaMRC=1 31.7843866 99.4186047 42.800318 1.217422e-69 17.639869
wheezeSB=1 51.6666667 36.0465116 9.546539 1.514228e-26 10.663125
asthmatic_wheeze=1 39.0476190 47.6744186 16.706444 2.359453e-25 10.404721
Recurrent_wheeze=1 28.1690141 46.5116279 22.593477 5.459479e-14 7.520434
Airway_medicine_use2=1 29.5833333 41.2790698 19.093079 2.417241e-13 7.323423
fam_asthma_allergy=1 19.9612403 59.8837209 41.050119 9.238378e-08 5.341101
exp_dust_work=1 20.6611570 43.6046512 28.878282 9.287700e-06 4.433125
current_rhinitis=1 15.3762268 81.9767442 72.951472 3.218026e-03 2.946106
exacerbations=1 29.1666667 8.1395349 3.818616 4.395297e-03 2.848304
fam_bronch_emphys=1 21.3740458 16.2790698 10.421639 1.049150e-02 2.559195
fam_bronch_emphys=0 12.7886323 83.7209302 89.578361 1.049150e-02 -2.559195
ever_smoker20py=2 8.0000000 9.3023256 15.910899 7.812264e-03 -2.660078
exacerbations=0 13.0686518 91.8604651 96.181384 4.395297e-03 -2.848304
current_rhinitis=0 9.1176471 18.0232558 27.048528 3.218026e-03 -2.946106
dyspneaMRC=2 0.0000000 0.0000000 3.898170 6.344133e-04 -3.416458
exp_dust_work=0 10.8501119 56.3953488 71.121718 9.287700e-06 -4.433125
fam_asthma_allergy=0 9.3117409 40.1162791 58.949881 9.238378e-08 -5.341101
Airway_medicine_use2=0 9.9311701 58.7209302 80.906921 2.417241e-13 -7.323423
Recurrent_wheeze=0 9.4552929 53.4883721 77.406523 5.459479e-14 -7.520434
asthmatic_wheeze=0 8.5959885 52.3255814 83.293556 2.359453e-25 -10.404721
wheezeSB=0 9.6745822 63.9534884 90.453461 1.514228e-26 -10.663125
dyspneaMRC=0 0.1526718 0.5813953 52.108194 9.208062e-60 -16.304238
$`3`
Cla/Mod Mod/Cla Global p.value v.test
dyspneaMRC=1 37.5464684 100.0000000 42.800318 1.101319e-86 19.733987
Recurrent_wheeze=0 20.0411100 96.5346535 77.406523 3.846725e-16 8.143292
exp_dust_work=0 20.2460850 89.6039604 71.121718 9.730541e-12 6.810433
wheezeSB=0 17.6781003 99.5049505 90.453461 6.422276e-09 5.805373
asthmatic_wheeze=0 18.4336199 95.5445545 83.293556 1.267720e-08 5.690360
Sputum_production=0 20.7153502 68.8118812 53.381066 1.273231e-06 4.843887
Chronic_productive_cough=0 18.0851064 92.5742574 82.259348 6.492764e-06 4.509673
gender=0 20.4892966 66.3366337 52.028640 7.871683e-06 4.468644
current_rhinitis=1 18.7568157 85.1485149 72.951472 8.618673e-06 4.449210
Airway_medicine_use2=0 18.0924287 91.0891089 80.906921 1.850511e-05 4.282204
Longstanding_cough=0 17.5000000 79.7029703 73.190135 2.054107e-02 2.316315
IgEorSPT=0 19.6473552 38.6138614 31.583134 2.075420e-02 2.312426
fam_bronch_emphys=0 16.7850799 93.5643564 89.578361 3.648168e-02 2.091518
fam_bronch_emphys=1 9.9236641 6.4356436 10.421639 3.648168e-02 -2.091518
IgEorSPT=1 14.4186047 61.3861386 68.416866 2.075420e-02 -2.312426
Longstanding_cough=1 12.1661721 20.2970297 26.809865 2.054107e-02 -2.316315
ever_smoker20py=2 8.5000000 8.4158416 15.910899 8.043778e-04 -3.351284
dyspneaMRC=2 0.0000000 0.0000000 3.898170 1.555541e-04 -3.782031
Airway_medicine_use2=1 7.5000000 8.9108911 19.093079 1.850511e-05 -4.282204
current_rhinitis=0 8.8235294 14.8514851 27.048528 8.618673e-06 -4.449210
gender=1 11.2769486 33.6633663 47.971360 7.871683e-06 -4.468644
Chronic_productive_cough=1 6.7264574 7.4257426 17.740652 6.492764e-06 -4.509673
Sputum_production=1 10.7508532 31.1881188 46.618934 1.273231e-06 -4.843887
asthmatic_wheeze=1 4.2857143 4.4554455 16.706444 1.267720e-08 -5.690360
wheezeSB=1 0.8333333 0.4950495 9.546539 6.422276e-09 -5.805373
exp_dust_work=1 5.7851240 10.3960396 28.878282 9.730541e-12 -6.810433
Recurrent_wheeze=1 2.4647887 3.4653465 22.593477 3.846725e-16 -8.143292
dyspneaMRC=0 0.0000000 0.0000000 52.108194 1.624404e-74 -18.263214
$`4`
Cla/Mod Mod/Cla Global p.value v.test
dyspneaMRC=2 100.000000 76.5625 3.8981702 3.397242e-75 18.348440
dyspneaMRC=3 100.000000 15.6250 0.7955449 5.785394e-14 7.512850
Recurrent_wheeze=1 13.380282 59.3750 22.5934765 8.414420e-11 6.492999
Airway_medicine_use2=1 14.166667 53.1250 19.0930788 4.061192e-10 6.251658
asthmatic_wheeze=1 14.285714 46.8750 16.7064439 7.832647e-09 5.772021
dyspneaMRC=4 100.000000 7.8125 0.3977725 2.938841e-07 5.127327
Chronic_productive_cough=1 12.556054 43.7500 17.7406523 7.068792e-07 4.959464
Sputum_production=1 8.191126 75.0000 46.6189340 2.631431e-06 4.697672
Longstanding_cough=1 9.495549 50.0000 26.8098648 5.416533e-05 4.036886
wheezeSB=1 13.333333 25.0000 9.5465394 2.113204e-04 3.705084
exacerbations=1 18.750000 14.0625 3.8186158 5.319585e-04 3.464125
ever_smoker20py=2 10.500000 32.8125 15.9108990 5.947443e-04 3.434000
fam_bronch_emphys=1 9.923664 20.3125 10.4216388 1.595813e-02 2.409872
gender=0 6.422018 65.6250 52.0286396 2.553771e-02 2.233170
ever_smoker20py=0 3.803487 37.5000 50.1988862 3.788107e-02 -2.076139
gender=1 3.648425 34.3750 47.9713604 2.553771e-02 -2.233170
fam_bronch_emphys=0 4.529307 79.6875 89.5783612 1.595813e-02 -2.409872
exacerbations=0 4.549214 85.9375 96.1813842 5.319585e-04 -3.464125
wheezeSB=0 4.221636 75.0000 90.4534606 2.113204e-04 -3.705084
Longstanding_cough=0 3.478261 50.0000 73.1901352 5.416533e-05 -4.036886
Sputum_production=0 2.384501 25.0000 53.3810660 2.631431e-06 -4.697672
Chronic_productive_cough=0 3.481625 56.2500 82.2593477 7.068792e-07 -4.959464
asthmatic_wheeze=0 3.247373 53.1250 83.2935561 7.832647e-09 -5.772021
Airway_medicine_use2=0 2.949853 46.8750 80.9069212 4.061192e-10 -6.251658
Recurrent_wheeze=0 2.672148 40.6250 77.4065235 8.414420e-11 -6.492999
dyspneaMRC=1 0.000000 0.0000 42.8003182 8.443431e-17 -8.324852
dyspneaMRC=0 0.000000 0.0000 52.1081941 5.456106e-22 -9.639296
$`5`
Cla/Mod Mod/Cla Global p.value v.test
dyspneaMRC=1 30.483271 100.000000 42.800318 2.008402e-68 17.480750
ever_smoker20py=2 37.500000 45.731707 15.910899 4.855441e-23 9.884594
Sputum_production=1 22.354949 79.878049 46.618934 1.086482e-20 9.327255
current_rhinitis=0 27.352941 56.707317 27.048528 5.817225e-18 8.636085
Chronic_productive_cough=1 24.215247 32.926829 17.740652 3.740118e-07 5.081730
exp_dust_work=1 19.008264 42.073171 28.878282 1.072847e-04 3.873497
fam_asthma_allergy=0 15.654521 70.731707 58.949881 8.720079e-04 3.328865
Longstanding_cough=1 18.397626 37.804878 26.809865 9.529575e-04 3.304059
Recurrent_wheeze=1 18.309859 31.707317 22.593477 3.826252e-03 2.892142
asthmatic_wheeze=0 14.135626 90.243902 83.293556 7.612210e-03 2.668803
wheezeSB=0 13.808267 95.731707 90.453461 8.488939e-03 2.631978
fam_bronch_emphys=1 19.083969 15.243902 10.421639 3.835727e-02 2.071016
fam_bronch_emphys=0 12.344583 84.756098 89.578361 3.835727e-02 -2.071016
wheezeSB=1 5.833333 4.268293 9.546539 8.488939e-03 -2.631978
asthmatic_wheeze=1 7.619048 9.756098 16.706444 7.612210e-03 -2.668803
Recurrent_wheeze=0 11.510791 68.292683 77.406523 3.826252e-03 -2.892142
Longstanding_cough=0 11.086957 62.195122 73.190135 9.529575e-04 -3.304059
dyspneaMRC=2 0.000000 0.000000 3.898170 9.167570e-04 -3.314901
fam_asthma_allergy=1 9.302326 29.268293 41.050119 8.720079e-04 -3.328865
exp_dust_work=0 10.626398 57.926829 71.121718 1.072847e-04 -3.873497
Chronic_productive_cough=0 10.638298 67.073171 82.259348 3.740118e-07 -5.081730
current_rhinitis=1 7.742639 43.292683 72.951472 5.817225e-18 -8.636085
Sputum_production=0 4.918033 20.121951 53.381066 1.086482e-20 -9.327255
ever_smoker20py=0 4.437401 17.073171 50.198886 5.496135e-21 -9.399235
dyspneaMRC=0 0.000000 0.000000 52.108194 5.463938e-59 -16.195066
Link between the cluster variable and the quantitative variables
================================================================
Eta2 P-value
F107 0.26485075 4.239122e-81
post_fev1_fvc_ratio 0.21669763 5.400125e-64
BMI 0.19683212 2.976765e-57
fev1pp_olin 0.18456569 3.545059e-53
fvcpp_olin 0.08861573 1.982564e-23
Description of each cluster by quantitative variables
=====================================================
$`0`
v.test Mean in category Overall mean sd in category Overall sd p.value
fev1pp_olin 10.292879 104.0477360 97.0359610 10.40966049 14.37506759 7.587340e-25
post_fev1_fvc_ratio 10.079407 0.8198007 0.7833509 0.04789693 0.07630947 6.813580e-24
fvcpp_olin 7.357658 100.5008289 96.1374840 10.41059758 12.51407379 1.871643e-13
BMI -8.629830 24.9691302 26.8305285 3.49667744 4.55151386 6.144339e-18
F107 -14.762485 41.6591598 52.0779492 12.61016543 14.89280709 2.556826e-49
$`1`
v.test Mean in category Overall mean sd in category Overall sd p.value
F107 12.154907 60.7097106 52.0779492 10.29462369 14.89280709 5.402324e-34
fev1pp_olin -3.459618 94.6645367 97.0359610 13.77340852 14.37506759 5.409421e-04
post_fev1_fvc_ratio -8.442971 0.7526292 0.7833509 0.06933842 0.07630947 3.093730e-17
$`2`
v.test Mean in category Overall mean sd in category Overall sd p.value
BMI 12.281422 30.7920350 26.8305285 5.2725423 4.55151386 1.139765e-34
post_fev1_fvc_ratio 4.164255 0.8058711 0.7833509 0.0611382 0.07630947 3.123706e-05
F107 -2.308584 49.6413842 52.0779492 15.2128067 14.89280709 2.096670e-02
fvcpp_olin -4.255465 92.3634873 96.1374840 11.8850546 12.51407379 2.086155e-05
$`3`
v.test Mean in category Overall mean sd in category Overall sd p.value
post_fev1_fvc_ratio 5.783553 0.8118105 0.7833509 0.05490749 0.07630947 7.313915e-09
fev1pp_olin 5.693330 102.3135068 97.0359610 11.66673977 14.37506759 1.245850e-08
fvcpp_olin 2.447555 98.1125743 96.1374840 10.88322735 12.51407379 1.438290e-02
F107 -2.882506 49.3097170 52.0779492 15.30998309 14.89280709 3.945255e-03
BMI -3.344518 25.8489047 26.8305285 3.74787167 4.55151386 8.242572e-04
$`4`
v.test Mean in category Overall mean sd in category Overall sd p.value
BMI 7.287718 30.8714728 26.8305285 6.4749574 4.55151386 3.152481e-13
F107 4.565343 60.3609056 52.0779492 13.2996419 14.89280709 4.986787e-06
post_fev1_fvc_ratio -5.230032 0.7347305 0.7833509 0.1163171 0.07630947 1.694806e-07
fvcpp_olin -6.297449 86.5368750 96.1374840 14.4471071 12.51407379 3.025840e-10
fev1pp_olin -7.557704 83.8006183 97.0359610 19.8280646 14.37506759 4.102462e-14
$`5`
v.test Mean in category Overall mean sd in category Overall sd p.value
F107 5.969072 58.553500 52.0779492 10.93713274 14.89280709 2.386063e-09
fvcpp_olin -3.872012 92.607857 96.1374840 12.97950572 12.51407379 1.079406e-04
fev1pp_olin -8.335613 88.307438 97.0359610 14.60218120 14.37506759 7.709798e-17
post_fev1_fvc_ratio -9.310101 0.731599 0.7833509 0.08881338 0.07630947 1.277106e-20